/**
 * file
 */
package com.tdkj.model.financial;

import java.sql.Timestamp;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import com.tdkj.model.base.BaseEntity;
import com.tdkj.model.user.BeanUser;

/**
 * 
 * FileName: TransferRecords.java
 * 
 * @Description: TODO转账记录
 * 
 *               All rights Reserved, Designed By ZTE-ITS
 * 
 *               Copyright: Copyright(C) 2010-2011
 * 
 *               Company 天成科技有限公司
 * 
 * @author: 李兴建
 * 
 * @version V1.0
 * 
 *          Createdate: 2012-7-30 下午08:36:18
 * 
 * 
 * 
 *          Modification History:
 * 
 *          Date Author Version Discription
 * 
 * 
 * 
 * 
 *          
 *          ----------------------------------------------------------------------
 *          -------------
 * 
 *          2012-7-30 李兴建 1.0 1.0
 * 
 *          Why & What is modified: <修改原因描述>
 */
@Entity
@Table(name = "financial_transfer_record")
public class BeanTransferRecord extends BaseEntity {
	private static final long serialVersionUID = 8479929634399201377L;
	// 转账时间
	private Timestamp dateTime;
	// 转账用户
	private BeanUser user;
	// 接收账户
	private BeanUser toUser;
	// 转账数量
	private Integer money;
	
	private String unit;
	// 转账类型,0,1 in out
	private int state;

	public Timestamp getDateTime() {
		return dateTime;
	}

	public void setDateTime(Timestamp dateTime) {
		this.dateTime = dateTime;
	}

	@ManyToOne(fetch = FetchType.LAZY, cascade = { CascadeType.REFRESH })
	@JoinColumn(name = "user_id")
	public BeanUser getUser() {
		return user;
	}

	public void setUser(BeanUser user) {
		this.user = user;
	}

	@ManyToOne(fetch = FetchType.LAZY, cascade = { CascadeType.REFRESH })
	@JoinColumn(name = "to_user_id")
	public BeanUser getToUser() {
		return toUser;
	}

	public void setToUser(BeanUser toUser) {
		this.toUser = toUser;
	}

	public int getState() {
		return state;
	}

	public void setState(int state) {
		this.state = state;
	}

	public static long getSerialversionuid() {
		return serialVersionUID;
	}

	public Integer getMoney() {
		return money;
	}
	public void setMoney(Integer money) {
		this.money = money;
	}
	public String getUnit() {
		return unit;
	}
	public void setUnit(String unit) {
		this.unit = unit;
	}

	
}
